/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * MenuPemasok.java
 *
 * Created on 11 Feb 09, 13:56:57
 */

package com.pos.spatobiz.app.view.pemasok;

import com.pos.spatobiz.app.controller.pemasok.TampilkanTambahPemasokAction;
import com.pos.spatobiz.app.view.widget.BigButton;
import echo.gokil.desktop.swing.Panel;
import java.util.Locale;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;

/**
 *
 * @author agung
 */
public class MenuPemasok extends Panel implements ApplicationContextAware, InitializingBean
{
    private static final long serialVersionUID = 1L;

    private ApplicationContext applicationContext;

    private TampilkanTambahPemasokAction tampilkanTambahPemasokAction;

    public TampilkanTambahPemasokAction getTampilkanTambahPemasokAction() {
        return tampilkanTambahPemasokAction;
    }

    public void setTampilkanTambahPemasokAction(TampilkanTambahPemasokAction tampilkanTambahPemasokAction) {
        this.tampilkanTambahPemasokAction = tampilkanTambahPemasokAction;
        getButtonTambahPemasok().addActionListener(tampilkanTambahPemasokAction);
    }



    /** Creates new form MenuPemasok */
    public MenuPemasok() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonDataPemasok = new com.pos.spatobiz.app.view.widget.BigButton();
        buttonTambahPemasok = new com.pos.spatobiz.app.view.widget.BigButton();
        buttonUbahPemasok = new com.pos.spatobiz.app.view.widget.BigButton();
        buttonHapusPemasok = new com.pos.spatobiz.app.view.widget.BigButton();

        setLayout(new java.awt.GridBagLayout());

        buttonDataPemasok.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/pos/spatobiz/app/resource/image/pemasok/accessories-character-map.png"))); // NOI18N
        buttonDataPemasok.setText("Data Pemasok");
        buttonDataPemasok.setName("buttonDataPemasok"); // NOI18N
        add(buttonDataPemasok, new java.awt.GridBagConstraints());

        buttonTambahPemasok.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/pos/spatobiz/app/resource/image/pemasok/add-folder-to-archive.png"))); // NOI18N
        buttonTambahPemasok.setText("Tambah Pemasok");
        buttonTambahPemasok.setName("buttonTambahPemasok"); // NOI18N
        add(buttonTambahPemasok, new java.awt.GridBagConstraints());

        buttonUbahPemasok.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/pos/spatobiz/app/resource/image/pemasok/accessories-text-editor.png"))); // NOI18N
        buttonUbahPemasok.setText("Ubah Pemasok");
        buttonUbahPemasok.setName("buttonUbahPemasok"); // NOI18N
        add(buttonUbahPemasok, new java.awt.GridBagConstraints());

        buttonHapusPemasok.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/pos/spatobiz/app/resource/image/pemasok/edit-delete.png"))); // NOI18N
        buttonHapusPemasok.setText("Hapus Pemasok");
        buttonHapusPemasok.setName("buttonHapusPemasok"); // NOI18N
        add(buttonHapusPemasok, new java.awt.GridBagConstraints());
    }// </editor-fold>//GEN-END:initComponents

    public BigButton getButtonDataPemasok() {
        return buttonDataPemasok;
    }

    public BigButton getButtonHapusPemasok() {
        return buttonHapusPemasok;
    }

    public BigButton getButtonTambahPemasok() {
        return buttonTambahPemasok;
    }

    public BigButton getButtonUbahPemasok() {
        return buttonUbahPemasok;
    }

    public void setApplicationContext(ApplicationContext arg0) throws BeansException {
        this.applicationContext = arg0;
    }

    public void afterPropertiesSet() throws Exception {
        setTitle(applicationContext.getMessage("menupemasok.title", null, Locale.getDefault()));
    }


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private com.pos.spatobiz.app.view.widget.BigButton buttonDataPemasok;
    private com.pos.spatobiz.app.view.widget.BigButton buttonHapusPemasok;
    private com.pos.spatobiz.app.view.widget.BigButton buttonTambahPemasok;
    private com.pos.spatobiz.app.view.widget.BigButton buttonUbahPemasok;
    // End of variables declaration//GEN-END:variables

}
